package com.rabbitmq.rabbitmqspring.listener;

import com.rabbitmq.rabbitmqspring.constant.Constants;
import lombok.extern.slf4j.Slf4j;
import org.apache.tomcat.util.bcel.Const;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class DirectListener {

    @RabbitListener(queues = Constants.DIRECT_QUEUE1)
    public void directListener1(String message) {
        log.info("listener1 接收路由模式消息: {}", message);
    }

    @RabbitListener(queues = Constants.DIRECT_QUEUE2)
    public void directListener2(String message) {
        log.info("listener2 接收路由模式消息: {}", message);
    }
}
